package vknob;

/**
 * A snapper 
 * modifies a knob drag value to a knob direction
 * to provide a feeling of snaps to a knob.
 */
public interface VKnobSnapper {
    /**
     * Returns an array of numbers between 0 and 1. Typically used to
     * draw markers around the knob.
     */
    public float[] getSnapPositions();
    
    /**
     * Modifies a drag value to a knob direction
     * to provide a feeling of snaps to a knob.
     *
     * @param x The default knob direction (the drag value), between 0 and 1.
     * @return The dezired knob direction, between 0 and 1.
     */
    public float getKnobDirection(float x);

    /** The inverse of getKnobDirection(float x) on the interval [0,1]. */
    public float getDragValue(float y);
}
